opam インストール
opamのインストール
Installation Instructions - Real World OCaml
opam - Install
opam - FAQ
code:memo
pogin503@DESKTOP ~
$ opam init
No configuration file found, using built-in defaults.
Checking for available remotes: rsync and local, git.
- you won't be able to use mercurial repositories unless you install the hg command on your system.
- you won't be able to use darcs repositories unless you install the darcs command on your system.
WARNING Recommended dependencies -- most packages rely on these:
- make
- cc
ERROR Missing dependencies -- the following commands are required for opam to operate:
- unzip
- bwrap: Sandboxing tool bwrap was not found. You should install 'bubblewrap'. See
https://opam.ocaml.org/doc/FAQ.html#Why-does-opam-require-bwrap.
unzip、bubblewrapがいるとのこと。
code:memo
$ sudo add-apt-repository ppa:avsm/ppa
Repository: 'deb https://ppa.launchpadcontent.net/avsm/ppa/ubuntu/ jammy main'
Description:
Latest stable versions of OCaml and OPAM.
More info: https://launchpad.net/~avsm/+archive/ubuntu/ppa
Adding repository.
Press ENTER to continue or Ctrl-c to cancel.
Adding deb entry to /etc/apt/sources.list.d/avsm-ubuntu-ppa-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/avsm-ubuntu-ppa-jammy.list
Adding key to /etc/apt/trusted.gpg.d/avsm-ubuntu-ppa.gpg with fingerprint 630F626C9FD811EBC19DF0955B2D0C5561707B09
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease 119 kB
Get:3 http://security.ubuntu.com/ubuntu jammy-security InRelease 110 kB
Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease 109 kB
Ign:5 https://ppa.launchpadcontent.net/avsm/ppa/ubuntu jammy InRelease
Get:6 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages 934 kB
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages 977 kB
Err:8 https://ppa.launchpadcontent.net/avsm/ppa/ubuntu jammy Release
404 Not Found IP: xxx.xxx.xxx.xxx 443
Reading package lists... Done
E: The repository 'https://ppa.launchpadcontent.net/avsm/ppa/ubuntu jammy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
pogin503@DESKTOP workspace
Ubuntu 22.04だとインストールできるものがないとのこと...。
調べたらopamパッケージはあった。
Ubuntu – jammy の opam パッケージに関する詳細
リポジトリを削除
code:memo
$ add-apt-repository --remove ppa:avsm/ppa
Ubuntu 22.04だと↓でよいっぽい
$ apt install opam
code:memo
pogin503@DESKTOP workspace
$ opam init
No configuration file found, using built-in defaults.
Checking for available remotes: rsync and local, git, mercurial, darcs. Perfect!
<><> Fetching repository information ><><><><><><><><><><><><><><><><><><><><><>
default Initialised
<><> Required setup - please read <><><><><><><><><><><><><><><><><><><><><><><>
In normal operation, opam only alters files within ~/.opam.
However, to best integrate with your system, some environment variables
should be set. If you allow it to, this initialisation step will update
your bash configuration by adding the following line to ~/.profile:
test -r /home/pogin503/.opam/opam-init/init.sh && . /home/pogin503/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
Otherwise, every time you want to access your opam installation, you will
need to run:
eval $(opam env)
You can always re-run this setup with 'opam init' later.
Do you want opam to modify ~/.profile? N/y/f
(default is 'no', use 'f' to choose a different file) y
User configuration:
Updating ~/.profile.
NOTE Make sure that ~/.profile is well sourced in your ~/.bashrc.
<><> Creating initial switch 'default' (invariant "ocaml" {>= "4.05.0"} - initially with ocaml-system)
<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: "ocaml" {>= "4.05.0"}
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
∗ installed ocaml-system.4.13.1
∗ installed ocaml-config.2
∗ installed ocaml.4.13.1
Done.
# Run eval $(opam env --switch=default) to update the current shell environment
現在シェルでopamが使えるようにする。
$ eval $(opam env --switch=default)
#opam